﻿/*
Copyright (C) 2011-2017  xfgryujk
https://tieba.baidu.com/f?kw=%D2%BB%B8%F6%BC%AB%C6%E4%D2%FE%C3%D8%D6%BB%D3%D0xfgryujk%D6%AA%B5%C0%B5%C4%B5%D8%B7%BD

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "stdafx.h"
#include <TBMEvents.h>


#define DEF_VARIABLE(name) decltype(name) name

TBM_API DEF_VARIABLE(g_mainDialogPostInitEvent);
TBM_API DEF_VARIABLE(g_mainDialogCloseEvent);
TBM_API DEF_VARIABLE(g_mainDialogDestroyEvent);

TBM_API DEF_VARIABLE(g_preSetCurrentUserEvent);
TBM_API DEF_VARIABLE(g_postSetCurrentUserEvent);
TBM_API DEF_VARIABLE(g_preSetTiebaEvent);
TBM_API DEF_VARIABLE(g_postSetTiebaEvent);

TBM_API DEF_VARIABLE(g_openLinkInLogEvent);


// 外部模块可注册的事件集合，用来自动卸载外部listener
TBM_API std::vector<EventBase*> g_tbmEvents{
	&g_mainDialogPostInitEvent,
	&g_mainDialogCloseEvent,
	&g_mainDialogDestroyEvent,

	&g_preSetCurrentUserEvent,
	&g_postSetCurrentUserEvent,
	&g_preSetTiebaEvent,
	&g_postSetTiebaEvent,

	&g_openLinkInLogEvent
};
